home *** CD-ROM | disk | FTP | other *** search
- on mouseUp
- global cx, cy, nextclick, hord, mainlist, donelist, lastClick, nextchan, complete
- if (count(donelist) > 0) and (getPos(donelist, the clickOn) = count(donelist)) then
- set the ink of sprite the clickOn to 36
- set nextclick to nextclick - 1
- if count(donelist) > 0 then
- deleteAt(donelist, count(donelist))
- set lastClick to getAt(donelist, count(donelist))
- set nextchan to getAt(hordlink, lastClick - 1)
- else
- set donelist to []
- set lastClick to 0
- set nextchan to [1]
- end if
- exit
- end if
- if getPos(nextchan, the clickOn - 1) = 0 then
- repeat with xxx = 1 to count(nextchan)
- set the blend of sprite (getAt(nextchan, xxx) + 1) to 50
- end repeat
- startTimer()
- repeat while the timer < 60
- updateStage()
- end repeat
- repeat with xxx = 1 to count(nextchan)
- set the blend of sprite (getAt(nextchan, xxx) + 1) to 100
- end repeat
- else
- if getAt(hord, the clickOn - 1) > 0 then
- if (getAt(mainlist, nextclick) = getAt(mainlist, abs(getAt(hord, the clickOn - 1)))) and (getPos(donelist, the clickOn) = 0) then
- set lastClick to the clickOn
- set nextclick to nextclick + 1
- set the ink of sprite the clickOn to 4
- set nextchan to getAt(hordlink, lastClick - 1)
- add(donelist, the clickOn)
- updateStage()
- else
- puppetSprite(1, 1)
- puppetSprite(25, 1)
- set mycnum to the castNum of sprite 25
- set the castNum of sprite 25 to the number of cast "correct3"
- play frame "mistake" & random(3)
- set the castNum of sprite 25 to mycnum
- puppetSprite(25, 0)
- end if
- else
- puppetSprite(1, 1)
- puppetSprite(25, 1)
- set mycnum to the castNum of sprite 25
- set the castNum of sprite 25 to the number of cast "correct3"
- play frame "mistake" & random(3)
- set the castNum of sprite 25 to mycnum
- puppetSprite(25, 0)
- end if
- if (nextclick > 10) and getAt(donelist, count(donelist)) then
- puppetSprite(25, 0)
- puppetSprite(1, 1)
- play frame complete
- repeat with xxx = 2 to 48
- puppetSprite(xxx, 0)
- end repeat
- go("begin")
- end if
- end if
- end
-